The Ciao clp(FD) Library. A Modular CLP Extension for Prolog
نویسندگان
چکیده
We present a new free library for Constraint Logic Programming over Finite Domains, included with the Ciao Prolog system. The library is entirely written in Prolog, leveraging on Ciao's module system and code transformation capabilities in order to achieve a highly modular design without compromising performance. We describe the interface, implementation, and design rationale of each modular component. The library meets several design goals: a high level of modularity, allowing the individual components to be replaced by di erent versions; highe ciency, being competitive with other FD implementations; a glass-box approach, so the user can specify new constraints at di erent levels; and a Prolog implementation, in order to ease the integration with Ciao's code analysis components. The core is built upon two small libraries which implement integer ranges and closures. On top of that, a nite domain variable datatype is de ned, taking care of constraint reexecution depending on range changes. These three libraries form what we call the FD kernel of the library. This FD kernel is used in turn to implement several higher-level nite domain constraints, speci ed using indexicals. Together with a labeling module this layer forms what we name the FD solver. A nal level integrates the CLP(FD) paradigm with our FD solver. This is achieved using attributed variables and a compiler from the CLP(FD) language to the set of constraints provided by the solver. It should be noted that the user of the library is encouraged to work in any of those levels as seen convenient: from writing a new range module to enriching the set of FD constraints by writing new indexicals.
منابع مشابه
ar X iv : 1 30 1 . 77 02 v 1 [ cs . P L ] 3 1 Ja n 20 13 The Ciao CLP ( FD ) Library A Modular CLP Extension for Prolog ( System
We present a new free library for Constraint Logic Programming over Finite Domains, included with the Ciao Prolog system. The library is entirely written in Prolog, leveraging on Ciao’s module system and code transformation capabilities in order to achieve a highly modular design without compromising performance. We describe the interface, implementation, and design rationale of each modular co...
متن کاملLightweight compilation of (C)LP to JavaScript
We present and evaluate a compiler from Prolog (and extensions) to JavaScript which makes it possible to use (constraint) logic programming to develop the client side of web applications while being compliant with current industry standards. Targeting JavaScript makes (C)LP programs executable in virtually every modern computing device with no additional software requirements from the point of ...
متن کاملDistributed WWW Programming using (Ciao-)Prolog and the PiLLoW library
We discuss from a practical point of view a number of issues involved in writing distributed Internet and WWW applications using LP/CLP systems. We describe PiLLoW, a publicdomain Internet and WWW programming library for LP/CLP systems that we have designed in order to simplify the process of writing such applications. PiLLoW provides facilities for accessing documents and code on the WWW; pars...
متن کاملSoft CLP (FD)
Over-constrained problems can be solved with the help of soft constraints. Weighted constraints are a typical representation of soft constraints used to minimize weights of unsatisfied constraints. A natural extension of the CLP(FD) approach is presented which allows handling of weighted soft constraints. To achieve this goal, the costs associated with unsatisfied constraints is accumulated for...
متن کاملWWW Programming using Computational Logic Systems (and the P¿LI_oW/CIAO Library)*
We discuss from a practical point of view a number of issues involved in writing Internet and WWW applications using LP/CLP systems. We describe Pd_l_oW, a public-domain Internet and WWW programming library for LP/CLP systems which we argüe significantly simplifies the process of writing such applications. Pd_l_oW provides facilities for generating HTML structured documents, producing HTML form...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1301.7702 شماره
صفحات -
تاریخ انتشار 2012